//
//  ArticleTableViewCell.h
//  HYSmileiOS
//
//  Created by alekye on 16/4/24.
//  Copyright © 2016年 heyou. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ArticleModel.h"

@interface ArticleTableViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIImageView *imageHeader;
@property (weak, nonatomic) IBOutlet UILabel *labelName;
@property (weak, nonatomic) IBOutlet UILabel *labelDesc;
@property (weak, nonatomic) IBOutlet UIImageView *imageContent;
@property (weak, nonatomic) IBOutlet UIButton *buttonMark;
@property (weak, nonatomic) IBOutlet UIButton *buttonComment;
@property (weak, nonatomic) IBOutlet UIButton *buttonHate;
@property (weak, nonatomic) IBOutlet UIButton *buttonLike;
@property (weak, nonatomic) IBOutlet UIView *fullImageTip;
@property (weak, nonatomic) IBOutlet UIView *downloadTipView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *layoutDownTipViewHeight;

/**
 *  内容的底部高度约束，用来控制Cell的行高
 */
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *layoutBottom;
/**
 *  图片的高度，根据图片比例动态调整
 */
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *layoutImageHeight;

/**
 *  设置图片信息，预期图片都需要填满UIImageView的宽度，高度自适应
 *
 *  @param model    数据模型
 *  @param download 设置是否需要下载图片，在TableViewCell用来计算高度的时候不需要下载
 */
- (void)setArticleInfo:(ArticleModel*)model downloadImage:(BOOL)download;

/**
 *  根据图片类型获取可显示的最大高度
 *
 *  @param imageType 图片类型
 *
 *  @return 高度
 */
+ (CGFloat)getImageMaxVisibleHeight:(HYImageType)imageType;

@end
